package com.fit4as.util.iterator
{
public class ArrayIterator implements Iterator
{
    private var array : Array;
    private var index : int;

    public function ArrayIterator(array : Array)
    {
        this.array = array;
        this.index = -1;
    }


    public function hasNext():Boolean
    {
        return index + 1 < array.length;
    }

    public function next():Object
    {
        return array[ ++index ];
    }

}
}